gtk4.git
6 years agotext: Propagate pango attributes to placeholder
Timm Bäder [Sun, 20 Oct 2019 06:43:50 +0000 (08:43 +0200)]
text: Propagate pango attributes to placeholder

Not sure if this is really always wanted or whether we need to filter
the attributes, or even create a separate property for them.

6 years agotext: Fix _set_attributes docs
Timm Bäder [Sun, 20 Oct 2019 06:39:55 +0000 (08:39 +0200)]
text: Fix _set_attributes docs

The list is nullable.

6 years agoplacessidebar: Remove some unused members
Timm Bäder [Sat, 19 Oct 2019 09:45:04 +0000 (11:45 +0200)]
placessidebar: Remove some unused members

6 years agoplacesview: Use proper setters for properties
Timm Bäder [Sat, 19 Oct 2019 09:40:36 +0000 (11:40 +0200)]
placesview: Use proper setters for properties

6 years agotext: Remove some unused members
Timm Bäder [Sat, 19 Oct 2019 09:23:38 +0000 (11:23 +0200)]
text: Remove some unused members

6 years agotext: Fix context menu position
Timm Bäder [Sat, 19 Oct 2019 09:04:03 +0000 (11:04 +0200)]
text: Fix context menu position

Fixes #2209

6 years agotext: Inline function into only caller
Timm Bäder [Sat, 19 Oct 2019 08:36:49 +0000 (10:36 +0200)]
text: Inline function into only caller

6 years agotext: Remove gtk_text_get_text_allocation
Timm Bäder [Sat, 19 Oct 2019 07:32:40 +0000 (09:32 +0200)]
text: Remove gtk_text_get_text_allocation

We can just replace that with get_width/get_height everywhere.

6 years agotext: Don't destroy pango layout in size_allocate
Timm Bäder [Sat, 19 Oct 2019 07:23:56 +0000 (09:23 +0200)]
text: Don't destroy pango layout in size_allocate

It's not needed.

6 years agoAdwaita: Fix menubutton in headerbar margins
Timm Bäder [Fri, 18 Oct 2019 09:44:32 +0000 (11:44 +0200)]
Adwaita: Fix menubutton in headerbar margins

Add the margins to the menubutton and not the button inside the
menubutton. This way popovers properly point to the inner button again
instead to somewhere 6px off.

6 years agoAdwaita: Remove padding from popover.menu
Timm Bäder [Fri, 18 Oct 2019 09:43:47 +0000 (11:43 +0200)]
Adwaita: Remove padding from popover.menu

The padding belongs to the contents subnode in this case.

6 years agofilechooserwidget: Add .menu to right-click popover
Timm Bäder [Fri, 18 Oct 2019 06:27:30 +0000 (08:27 +0200)]
filechooserwidget: Add .menu to right-click popover

Make it look like the other menus.

6 years agofilechooserwidget: Focus the searchbar when searching
Timm Bäder [Fri, 18 Oct 2019 05:43:21 +0000 (07:43 +0200)]
filechooserwidget: Focus the searchbar when searching

This code path is taken if the search is already active, so focus the
search entry.

6 years agofilechooserwidget: Rename a callback
Timm Bäder [Fri, 18 Oct 2019 05:23:02 +0000 (07:23 +0200)]
filechooserwidget: Rename a callback

6 years agoshortcutlabel: Inherit from GtkWidget
Timm Bäder [Fri, 18 Oct 2019 04:20:35 +0000 (06:20 +0200)]
shortcutlabel: Inherit from GtkWidget

6 years agoshortcutlabel: Inherit from GtkWidget
Timm Bäder [Fri, 18 Oct 2019 04:20:35 +0000 (06:20 +0200)]
shortcutlabel: Inherit from GtkWidget

6 years agosearchentry: Make the text entry expand
Timm Bäder [Thu, 17 Oct 2019 14:38:21 +0000 (16:38 +0200)]
searchentry: Make the text entry expand

Fixes the broken layout.

6 years agotext: Remove an unnecessary queue_draw() call
Timm Bäder [Thu, 17 Oct 2019 14:37:17 +0000 (16:37 +0200)]
text: Remove an unnecessary queue_draw() call

6 years agoMerge branch 'wip/matthiasc/icon-theme' into 'master'
Matthias Clasen [Sat, 19 Oct 2019 22:43:34 +0000 (22:43 +0000)]
Merge branch 'wip/matthiasc/icon-theme' into 'master'

Misc icon theme cleanups

See merge request GNOME/gtk!1139

6 years agoinspector: Fix node recording
Matthias Clasen [Fri, 18 Oct 2019 14:33:45 +0000 (09:33 -0500)]
inspector: Fix node recording

When attaching renderer-specific data, we need to
make sure that we key it off the renderer that is
in use, and cope with the absence of render data.

This fixes recording nodes in the inspector.

6 years agoDrop gtk_icon_info_new_for_pixbuf
Matthias Clasen [Fri, 18 Oct 2019 13:47:07 +0000 (08:47 -0500)]
Drop gtk_icon_info_new_for_pixbuf

It is better to keep icon infos as something you
only get from the icon theme.

6 years agoMove symbolic pixbuf recoloring code
Matthias Clasen [Fri, 18 Oct 2019 13:40:00 +0000 (08:40 -0500)]
Move symbolic pixbuf recoloring code

This function is better off next to the other
symbolic png code in gdkpixbufutils.c.

6 years agoicon theme: Drop icon_file from GtkIconInfo
Matthias Clasen [Fri, 18 Oct 2019 13:23:44 +0000 (08:23 -0500)]
icon theme: Drop icon_file from GtkIconInfo

It is not used anymore.

6 years agoDrop another use of icon_file
Matthias Clasen [Fri, 18 Oct 2019 13:10:01 +0000 (08:10 -0500)]
Drop another use of icon_file

Stop using icon_file when loading symbolic svgs.

6 years agoDrop another use of icon_file
Matthias Clasen [Fri, 18 Oct 2019 12:48:46 +0000 (07:48 -0500)]
Drop another use of icon_file

6 years agoAdd another symbolic pixbuf helper
Matthias Clasen [Fri, 18 Oct 2019 12:46:52 +0000 (07:46 -0500)]
Add another symbolic pixbuf helper

6 years agoAvoid a use of icon_file
Matthias Clasen [Thu, 17 Oct 2019 12:55:25 +0000 (07:55 -0500)]
Avoid a use of icon_file

This is a step towards getting rid of GtkIconInfo->icon_file.

6 years agoicon theme: Start to untangle GtkIconInfo
Matthias Clasen [Fri, 18 Oct 2019 12:22:11 +0000 (07:22 -0500)]
icon theme: Start to untangle GtkIconInfo

GtkIconInfo contains too much redundant data,
and it is hard to know which fields are to be
used when.

This commit starts to move towards dropping the
icon_file field - we prefer to work with the
filename directly, since it lets us avoid mime
sniffing and strdups.

6 years agoDrop gtk_icon_theme_get_example_icon_name
Matthias Clasen [Fri, 18 Oct 2019 12:20:25 +0000 (07:20 -0500)]
Drop gtk_icon_theme_get_example_icon_name

This function is not useful. Every icon theme
on my system either does not have that field,
or has it as 'folder'. So, just use 'folder'
when you need an example icon.

6 years agoDrop gtk_icon_theme_list_contexts
Matthias Clasen [Thu, 17 Oct 2019 21:24:21 +0000 (16:24 -0500)]
Drop gtk_icon_theme_list_contexts

Contexts in icon themes are not useful for anything.

6 years agotesticontheme: Remove useless function
Matthias Clasen [Thu, 17 Oct 2019 21:21:45 +0000 (16:21 -0500)]
testicontheme: Remove useless function

Contexts in icon themes are not useful for anything,
so drop this function from testicontheme.

6 years agoicon theme: Avoid a string copy
Matthias Clasen [Thu, 17 Oct 2019 12:56:27 +0000 (07:56 -0500)]
icon theme: Avoid a string copy

This is in an error path, so mostly cosmetic.

6 years agoUpdate POTFILES.in
Piotr Drąg [Thu, 17 Oct 2019 18:11:58 +0000 (20:11 +0200)]
Update POTFILES.in

6 years agogl: Remove an unimplemented profiler counter
Matthias Clasen [Wed, 16 Oct 2019 21:53:34 +0000 (17:53 -0400)]
gl: Remove an unimplemented profiler counter

6 years agogl: Add debug spew to texture atlas
Matthias Clasen [Wed, 16 Oct 2019 21:13:20 +0000 (17:13 -0400)]
gl: Add debug spew to texture atlas

6 years agoglyph cache: Go back to memcmp
Matthias Clasen [Sun, 13 Oct 2019 00:09:14 +0000 (20:09 -0400)]
glyph cache: Go back to memcmp

Be careful to avoid padding data, and only
compare the relevant parts, leaving out the
hash key.

6 years agoCosmetics
Matthias Clasen [Wed, 16 Oct 2019 10:34:10 +0000 (06:34 -0400)]
Cosmetics

6 years agoRevert "icon theme: Avoid a string copy"
Matthias Clasen [Thu, 17 Oct 2019 12:15:30 +0000 (07:15 -0500)]
Revert "icon theme: Avoid a string copy"

This reverts commit 0895f0211e535ac0bdf7e461bb0e046bdee60c4d.

This negatively affected icons that are included as
resources, since peek_path returns NULL for them.

6 years agoUpdate Croatian translation
Goran Vidović [Thu, 17 Oct 2019 12:03:32 +0000 (12:03 +0000)]
Update Croatian translation

6 years agoMerge branch 'wip/chergert/opbuffer' into 'master'
Matthias Clasen [Thu, 17 Oct 2019 11:37:07 +0000 (11:37 +0000)]
Merge branch 'wip/chergert/opbuffer' into 'master'

Add OpBuffer helper for building op buffer

See merge request GNOME/gtk!1131

6 years agoUpdate Croatian translation
Goran Vidović [Thu, 17 Oct 2019 11:36:10 +0000 (11:36 +0000)]
Update Croatian translation

6 years agoUpdate Croatian translation
Goran Vidović [Thu, 17 Oct 2019 11:23:00 +0000 (11:23 +0000)]
Update Croatian translation

6 years agoMerge branch 'otte/for-master' into 'master'
Benjamin Otte [Wed, 16 Oct 2019 20:25:57 +0000 (20:25 +0000)]
Merge branch 'otte/for-master' into 'master'

Otte/for master

See merge request GNOME/gtk!1136

6 years agoentry: Return boolean from gtk_entry_grab_focus_without_selecting()
Benjamin Otte [Wed, 16 Oct 2019 19:36:05 +0000 (21:36 +0200)]
entry: Return boolean from gtk_entry_grab_focus_without_selecting()

This follows recent changes to gtk_widget_grab_focus().

6 years agorender: Fix goto
Benjamin Otte [Wed, 16 Oct 2019 15:48:25 +0000 (17:48 +0200)]
render: Fix goto

if we have pushed a shadow, we better pop it again.

Broken since d1ea591f18f

6 years agoInitialize cursor alpha to 1.0
Benjamin Otte [Wed, 16 Oct 2019 13:02:52 +0000 (15:02 +0200)]
Initialize cursor alpha to 1.0

That way, non-animated cursors don't disappear.

6 years agobindings: Make gtk_bindings_add_callback() allow for variant args
Benjamin Otte [Wed, 16 Oct 2019 01:07:43 +0000 (03:07 +0200)]
bindings: Make gtk_bindings_add_callback() allow for variant args

6 years agobindings: Refactor
Benjamin Otte [Wed, 16 Oct 2019 01:01:49 +0000 (03:01 +0200)]
bindings: Refactor

Refactor code so that each bindings type has its own struct instead of
sharing one big union.

6 years agoMerge branch 'fix-popover-styles' into 'master'
Timm Bäder [Wed, 16 Oct 2019 07:42:45 +0000 (07:42 +0000)]
Merge branch 'fix-popover-styles' into 'master'

Fix popover styles (GTK 4)

Closes #2061

See merge request GNOME/gtk!1079

6 years agoFix a crash with glyph caching
Matthias Clasen [Wed, 16 Oct 2019 02:52:28 +0000 (22:52 -0400)]
Fix a crash with glyph caching

We need to treat atlas-less cached glyphs like
atlases, when it comes to invalidating text node
render data.

6 years agogsk: Fix uninitialized memory
Matthias Clasen [Wed, 16 Oct 2019 00:54:24 +0000 (20:54 -0400)]
gsk: Fix uninitialized memory

This was causing crashes in some circumstances.

6 years agoicon theme: Avoid a string copy
Matthias Clasen [Tue, 15 Oct 2019 23:20:05 +0000 (19:20 -0400)]
icon theme: Avoid a string copy

GIO has gained a way to peek at a GFile
path; lets use that.

6 years agoicon theme: Avoid mime sniffing
Matthias Clasen [Tue, 15 Oct 2019 23:05:52 +0000 (19:05 -0400)]
icon theme: Avoid mime sniffing

Themed icons are always pngs or svgs.
Take advantage of that to avoid costly
mime sniffing.

6 years agopixbuf utils: Preserve format information
Matthias Clasen [Tue, 15 Oct 2019 23:04:01 +0000 (19:04 -0400)]
pixbuf utils: Preserve format information

When we are loading themed icons, we know if
we deal with an svg or png file, so it is
entirely unnecessarily to have gdk-pixbuf
use g_content_type guess to rediscover that
information.

Change the pixbuf utils apis we have to allow
passing format information down to where we
can use it when creating the pixbuf loader.

6 years agogl: Speed up icon cache lookups
Matthias Clasen [Tue, 15 Oct 2019 12:27:16 +0000 (08:27 -0400)]
gl: Speed up icon cache lookups

Use gdk_texture_set_render_data to avoid
hash table lookups when we can.

6 years agogl: Slightly rework the icon cache api
Matthias Clasen [Tue, 15 Oct 2019 11:51:05 +0000 (07:51 -0400)]
gl: Slightly rework the icon cache api

Return a pointer to the IconData struct. This is
closer to the glyph cache api, and will allow us
to add similar shortcuts. For now, just store
texture coords in the form we need, avoiding
converting them over and over.

6 years agoCache glyph textures in render nodes
Matthias Clasen [Tue, 15 Oct 2019 04:14:43 +0000 (00:14 -0400)]
Cache glyph textures in render nodes

This is a quick implementation that avoids many
glyph cache lookups. We keep an array of direct
pointers in the text render node, and throw those
cached pointers away whenever any atlases have
been dropped (since that may invalidate the cached
glyphs).

6 years agoSome more vertex data reshuffling
Matthias Clasen [Tue, 15 Oct 2019 03:28:15 +0000 (23:28 -0400)]
Some more vertex data reshuffling

In some cases, the vertex data is just a trivial
modification of the default data, so do that instead
of recalculating it.

6 years agoFix load_vertex_data
Matthias Clasen [Tue, 15 Oct 2019 02:09:12 +0000 (22:09 -0400)]
Fix load_vertex_data

There was a copy-paste error that set all
uv coordinates to 0,0.

6 years agogl: avoid calculating vertex_data until necessary
Christian Hergert [Sun, 13 Oct 2019 23:39:54 +0000 (16:39 -0700)]
gl: avoid calculating vertex_data until necessary

In many cases of the switch, we do not need the vertex data. This moves
the creation of the vertex_data array into a secondary function and only
calculates it the cases for which it is required.

6 years agogl: Drop buffer_size
Matthias Clasen [Fri, 11 Oct 2019 18:10:56 +0000 (14:10 -0400)]
gl: Drop buffer_size

No need to maintain buffer_size separately.
It is always vertices->len * sizeof (GskQuadVertex).

6 years agoDrop OP_CHANGE_VAO
Matthias Clasen [Fri, 11 Oct 2019 17:59:58 +0000 (13:59 -0400)]
Drop OP_CHANGE_VAO

Instead, we accumulate vertices in a separate
array, which simplifies various things and lets
us avoid the extra copying step for the vao.

6 years agoprototype OpBuffer helper for building op buffer
Christian Hergert [Fri, 11 Oct 2019 14:23:33 +0000 (10:23 -0400)]
prototype OpBuffer helper for building op buffer

6 years agoMerge branch 'otte/for-master' into 'master'
Benjamin Otte [Tue, 15 Oct 2019 18:47:57 +0000 (18:47 +0000)]
Merge branch 'otte/for-master' into 'master'

Otte/for master

See merge request GNOME/gtk!1133

6 years agowidget: Don't grab focus when can-focus == false
Benjamin Otte [Tue, 15 Oct 2019 14:30:46 +0000 (16:30 +0200)]
widget: Don't grab focus when can-focus == false

... inside the default vfunc.

Instead, walk the children until we find the first widget that can be
focused. If no child can be focused, return FALSE from grab_focus.

6 years agowidget: Insist that widgets are rooted to be focusable
Benjamin Otte [Tue, 15 Oct 2019 14:11:03 +0000 (16:11 +0200)]
widget: Insist that widgets are rooted to be focusable

This check was in the vfunc before, but it's a general rule, so apply it
before.

6 years agowidget: Make grab_focus() fail on insensitive widgets
Benjamin Otte [Tue, 15 Oct 2019 14:07:24 +0000 (16:07 +0200)]
widget: Make grab_focus() fail on insensitive widgets

We can return FALSE early now instead of silently failing in
gtk_window_set_focus().

6 years agowidget: Make gtk_widget_grab_focus() return a boolean
Benjamin Otte [Tue, 15 Oct 2019 13:34:16 +0000 (15:34 +0200)]
widget: Make gtk_widget_grab_focus() return a boolean

So now it can actually fail.

It doesn't yet though.

6 years agobindings: Add gtk_binding_entry_add_callback()
Benjamin Otte [Tue, 15 Oct 2019 03:50:52 +0000 (05:50 +0200)]
bindings: Add gtk_binding_entry_add_callback()

This allows bindings that have no public API.

6 years agobindings: Add gtk_binding_entry_add_action()
Benjamin Otte [Mon, 14 Oct 2019 19:34:40 +0000 (21:34 +0200)]
bindings: Add gtk_binding_entry_add_action()

Allows registering bindings for activating widget actions, as an
alternative to signal emissions.

6 years agowidget: Make gtk_widget_activate_action() return TRUE/FALSE
Benjamin Otte [Mon, 14 Oct 2019 19:34:00 +0000 (21:34 +0200)]
widget: Make gtk_widget_activate_action() return TRUE/FALSE

TRUE if an action was successfully activated, FALSE if it wasn't found.

6 years agogtk: Add GtkNoSelection
Benjamin Otte [Mon, 7 Oct 2019 04:28:28 +0000 (06:28 +0200)]
gtk: Add GtkNoSelection

Allows not to have anything selected.

6 years agosingleselection: Fix model property
Benjamin Otte [Mon, 7 Oct 2019 04:36:25 +0000 (06:36 +0200)]
singleselection: Fix model property

1. Make the model property construct-only. Allowing to change the
   model has invalid side effects.

2. Add a getter for the model property.

6 years agoexpander: Rename CSS nodes
Benjamin Otte [Sun, 13 Oct 2019 19:00:40 +0000 (21:00 +0200)]
expander: Rename CSS nodes

The expander icon is renamed from "arrow" to "expander".
The expander widget itself is renamed from "expander" to
"expander-widget" (Better ideas welcome).

This makes it possible to have an "expander" icon in more places then
the GtkExpander widget (in particular in tree lists) and not
confuse it with arrows.

6 years agocssimagebuiltin: Don't create cairo nodes for empty icons
Timm Bäder [Tue, 15 Oct 2019 05:13:28 +0000 (07:13 +0200)]
cssimagebuiltin: Don't create cairo nodes for empty icons

GTK_CSS_IMAGE_BUILTIN_NONE is not going to draw anything of course, so
don't bother creating an empty cairo node for it.

6 years agogl renderer: Fix an out of bounds read
Timm Bäder [Tue, 15 Oct 2019 05:13:14 +0000 (07:13 +0200)]
gl renderer: Fix an out of bounds read

Fixes #2200

6 years agonotebook: Avoid a crash
Matthias Clasen [Sat, 12 Oct 2019 23:00:35 +0000 (19:00 -0400)]
notebook: Avoid a crash

This is fallout from turning the menu into
a popover, causing it to be be a child.

6 years agoglyph cache: Fix handling of big glyphs
Matthias Clasen [Sat, 12 Oct 2019 22:26:09 +0000 (18:26 -0400)]
glyph cache: Fix handling of big glyphs

We were putting big glyphs in the cache, in their
own texture, but forgetting to mark the texture
as permanent, so it could be reused, leading to
occasional misrendering. Fix this by marking these
textures as permanent, and explicitly freeing them
when the cache entry gets old.

6 years agoshadow cache: Remove outdated comments
Matthias Clasen [Sat, 12 Oct 2019 21:06:39 +0000 (17:06 -0400)]
shadow cache: Remove outdated comments

No comments are better than outdated comments.

6 years agogl: Increate the cache check frequency
Matthias Clasen [Sat, 12 Oct 2019 16:34:56 +0000 (12:34 -0400)]
gl: Increate the cache check frequency

Otherwise, we spread the cache over more atlases
than necessary, increasing the amount of texture
changes in each frame.

6 years agogl: Interleave cache aging
Matthias Clasen [Sat, 12 Oct 2019 16:33:43 +0000 (12:33 -0400)]
gl: Interleave cache aging

Every few frames, we do extra work for the
cache aging. Arrange for the glyph and icon
caches to not cause extra work on the same
frame, to smooth things out.

6 years agogl: Improve debug spew for caches
Matthias Clasen [Sat, 12 Oct 2019 16:32:49 +0000 (12:32 -0400)]
gl: Improve debug spew for caches

Dump similar information for both caches,
and correct the unused percentage for
the atlases.

6 years agoUpdate stackswitcher CSS
Timm Bäder [Sat, 12 Oct 2019 16:26:54 +0000 (18:26 +0200)]
Update stackswitcher CSS

Add the spacing to circular stack switchers back.

6 years agostackswitcher: Inherit from GtkWidget
Timm Bäder [Sat, 12 Oct 2019 16:09:12 +0000 (18:09 +0200)]
stackswitcher: Inherit from GtkWidget

6 years agocolorscale: Remove some duplicated code
Timm Bäder [Sat, 12 Oct 2019 15:53:59 +0000 (17:53 +0200)]
colorscale: Remove some duplicated code

6 years agomenuitem: Remove unused members
Timm Bäder [Sat, 12 Oct 2019 15:41:20 +0000 (17:41 +0200)]
menuitem: Remove unused members

6 years agomenu: Align function parameters
Timm Bäder [Sat, 12 Oct 2019 15:37:37 +0000 (17:37 +0200)]
menu: Align function parameters

6 years agomenu: Remove unused members
Timm Bäder [Sat, 12 Oct 2019 15:27:58 +0000 (17:27 +0200)]
menu: Remove unused members

6 years agomenu: Remove menu_queue_resize
Timm Bäder [Sat, 12 Oct 2019 15:24:42 +0000 (17:24 +0200)]
menu: Remove menu_queue_resize

The have_layout flag is unused, so this is equal to a normal
gtk_widget_queue_resize().

6 years agoMerge branch 'glyphcache-fiddling' into 'master'
Matthias Clasen [Sat, 12 Oct 2019 15:56:08 +0000 (15:56 +0000)]
Merge branch 'glyphcache-fiddling' into 'master'

Glyphcache fiddling

See merge request GNOME/gtk!1132

6 years agogl: Make icon cache work like glyph cache
Matthias Clasen [Sat, 12 Oct 2019 15:46:10 +0000 (11:46 -0400)]
gl: Make icon cache work like glyph cache

Replace timestamp tracking with an accessed bit
here too, to keep the glyph and icon cache code
similar.

6 years agogl: Do less work on glyph caching
Matthias Clasen [Sat, 12 Oct 2019 15:03:04 +0000 (11:03 -0400)]
gl: Do less work on glyph caching

There is no need for us to be very precise about
aging the glyph entries. It is enough to check
occasionally and mark old entries. This reduces
the overhead of work we do every frame on the
caches, at the cost of letting glyphs linger
a bit longer in the cache.

6 years agoiconcache: Fix icon padding
Timm Bäder [Sat, 12 Oct 2019 07:17:24 +0000 (09:17 +0200)]
iconcache: Fix icon padding

6 years agogl: Simplify glyph cache lookup
Matthias Clasen [Sat, 12 Oct 2019 05:35:13 +0000 (01:35 -0400)]
gl: Simplify glyph cache lookup

Make this function more similar to the icon
cache equivalent, and simplify it a bit. We
don't use the boolean return, and we don't need
to look at the age of entry when marking it
used.

6 years agogl: Don't use memcmp for comparing cache keys
Matthias Clasen [Sat, 12 Oct 2019 05:00:08 +0000 (01:00 -0400)]
gl: Don't use memcmp for comparing cache keys

Some innocent change made us use a stack-allocated
key, and things broke. Lets go back to comparing
cache keys field by field.

6 years agoMake the scrolling demo more versatile
Matthias Clasen [Sat, 12 Oct 2019 02:04:30 +0000 (22:04 -0400)]
Make the scrolling demo more versatile

Allow to swap out the content, so we can compare
text and icon scrolling.

6 years agogl: Handle row stride for icon cache upload
Matthias Clasen [Sat, 12 Oct 2019 01:17:30 +0000 (21:17 -0400)]
gl: Handle row stride for icon cache upload

Same as the previous commit: Downloading a texture
may in theory give us data with a stride, so handle
that.

6 years agogl: Handle row stride for glyph cache upload
Matthias Clasen [Sat, 12 Oct 2019 01:16:40 +0000 (21:16 -0400)]
gl: Handle row stride for glyph cache upload

In theory, we can have data with a stride here,
so set the necessary parameters to tell GL about
it.

6 years agogl: Do less work to maintain caches
Matthias Clasen [Sat, 12 Oct 2019 00:42:24 +0000 (20:42 -0400)]
gl: Do less work to maintain caches

Remember which atlases were removed, and only
check those when looking for icons or glyphs
to remove. For most frames, we don't have to
check at all since no atlases were removed.

6 years agogl: Speed up icon caching
Matthias Clasen [Fri, 11 Oct 2019 23:36:26 +0000 (19:36 -0400)]
gl: Speed up icon caching

Avoid expensive padding, and just upload the
image in several slices.